Hierarchical Data
Qrvey has the ability to work with and analyze hierarchical data, which is often uploaded via JSON File. Hierarchical data allows you to organize information in a nested structure, making it easy to represent parent-child relationships. In Qrvey, hierarchical data can be used to create detailed, multi-level data visualizations and analyses.
Create a Hierarchical Dataset
To create a hierarchical dataset, follow these steps.
- Navigate to the Data > Dataset.
- Click New Dataset. A modal will appear.
- Find the desired JSON File connection from the list.
- Click Create. This will take you to the Dataset Design step.
View Hierarchical Dataset
- Navigate to the desired hierarchical dataset.
- Click to open it.
If your JSON file contains numeric or textarrays
,objects
, orobject arrays
, the UI will reflect this.
For example, assuming the following JSON structure:
[
{
"Name":"John Smith",
"DOB":"12/23/1975",
"children":2,
"childrenAges":[10,12], // numeric array
"carModels":["Ford","Chevy"], // string array
"address": { "city":"Chicago", "state":"IL",}, // object
"countriesVisited":[ // object array
{ "id":10, "country":"Germany" },
{ "id":15, "country":"Spain" },
{ "id":18, "country":"Iraq" }
]
}
]
The Data > Dataset > Columns page will register these new data structures.
- There are new column types like Numeric Array, Text Array, Object, and Object Array.
- The
Address
column is an object that has its own nested columns. CountriesVisited
is an object array with its own nested columns. Furthermore, the column and its children are not selected and are in fact disabled.
You may also navigate into the Data > Dataset > View Source Data tab to see how the raw data is registered in Qrvey.
The parent records in the main data source have a one-to-many relationship with countriesVisited
object array, which can act like a left join between two relational tables and can be “inflated” to produce a flat dataset.
Customize Hierarchical Datasets
You can apply Transformations as well as design and modify your dataset before loading it (just like with other datasets) as well as flatten object arrays.
In order to flatten an object array, follow these steps.
- Click the Transformations button on the top right corner of the columns list.
- Drag the Array Flatten transformation to the workspace.
- Select the Inflate option from the dropdown menu.
As soon as the Transformation dialog is closed, this transformation flattens the array and the effect can be seen on the Dataset Design tab.